package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;

public class MainActivity extends AppCompatActivity {
    private RecyclerView rvMainPeople;




String [] names = {"张三","李四","王五","小六","小七","小八","小九","小十","小十一"};
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        OnCink();
        rvMainPeople.setLayoutManager(new LinearLayoutManager(this));
        Pe.PeopleAdapter adapter = new Pe.PeopleAdapter(names);
        rvMainPeople.setAdapter(adapter);






    }
    private void OnCink(){
        rvMainPeople = findViewById(R.id.Recy_one);
    }
}